import Vue from 'vue'
import Vuex from 'vuex'
import tab from '@/store/modules/tab.js'
import editfo from '@/store/modules/editinfo.js'
import song1 from '@/store/modules/song1.js'
import SongDatas from '@/store/modules/songedit'
import createPersistedstate from 'vuex-persistedstate'
import music from '@/store/modules/music.js'
import search from '@/store/modules/search.js'
import muslyric from '@/store/modules/MusicLyric.js'
import userinfo from '@/store/modules/userinfo.js'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
  },
  getters: {
  },
  mutations: {
  },
  actions: {
  },
  modules: {
    tab,
    editfo,
    song1,
    SongDatas,
    music,
    search,
    muslyric,
    userinfo
  },
  plugins: [
    createPersistedstate(
      {
        key:'info',
        paths:['song1','search','userinfo','editfo']
      }
    )
  ]//数据持久化 防止刷新数据丢失
})
